package org.drjava;
import io.swagger.annotations.ApiOperation;
import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2;


@SpringBootApplication
@ComponentScan(basePackages = {"org.drjava"})
@EnableDiscoveryClient
//https://github.com/spring-cloud/spring-cloud-consul/blob/master/spring-cloud-consul-sample/src/main/java/org/springframework/cloud/consul/sample/SampleConsulApplication.java
//以上连接有各loadbalance，discoverclient使用示例
//参考文档：http://www.jianshu.com/p/0aef3724e6bc
@RestController
@EnableSwagger2
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class,DataSourceTransactionManagerAutoConfiguration.class, MybatisAutoConfiguration.class})
public class Application {

	@ApiOperation("test")
	@RequestMapping("/")
	public String home() {
		return "hd";
	}

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

}